Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.

[Merged by Bors] - feat(category_theory/limits): make has_limit a Prop - #3995

Closed
kim-em wants to merge 123 commits into
masterfrom
prop_limits
Closed

kim-em wants to merge 123 commits into
masterfrom
prop_limits

Conversation

@kim-em

@kim-em kim-em commented Aug 31, 2020 •

Copy link
Copy Markdown
Collaborator

We change has_limit so that it is only an existential statement that limit data exists, and in particular lives in Prop.

This means we can safely have multiple has_limit classes for the same functor, because proof irrelevance ensures Lean sees them all as the same.

We still have access to the API which lets us pretend we have consistently chosen limits, but now these limits are provided by the axiom of choice and hence are definitionally opaque.


I've only just got this to compile, so it probably still have a few rough edges! I'll put it up as RFC at first.

Thanks @rwbarton for knowing this needed to be done (apologies for taking so long in getting to it), and to @TwoFX for kicking off the branch.

Blocked by #3973, #3993, #3994.

@bors

bors Bot commented Sep 12, 2020

Copy link
Copy Markdown

Build failed:

@kim-em

kim-em commented Sep 12, 2020

Copy link
Copy Markdown
Collaborator Author

bors merge

bors Bot pushed a commit that referenced this pull request Sep 12, 2020
We change `has_limit` so that it is only an existential statement that limit data exists, and in particular lives in `Prop`.

This means we can safely have multiple `has_limit` classes for the same functor, because proof irrelevance ensures Lean sees them all as the same.

We still have access to the API which lets us pretend we have consistently chosen limits, but now these limits are provided by the axiom of choice and hence are definitionally opaque.



Co-authored-by: Markus Himmel <[email protected]>
Co-authored-by: Scott Morrison <[email protected]>
Co-authored-by: Simon Hudon <[email protected]>
@bors

bors Bot commented Sep 12, 2020

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded:

@bors bors Bot changed the title feat(category_theory/limits): make has_limit a Prop [Merged by Bors] - feat(category_theory/limits): make has_limit a Prop Sep 12, 2020
@bors bors Bot closed this Sep 12, 2020
@bors
bors Bot deleted the prop_limits branch September 12, 2020 07:13
bors Bot pushed a commit that referenced this pull request Sep 14, 2020
…#4141)

Ongoing cleanup post #3995.

Previously we couldn't construct things like `instance : has_kernel (0 : X \hom Y)`, because it wouldn't have agreed definitionally with more general instances. Now we can.



Co-authored-by: Scott Morrison <[email protected]>
bors Bot pushed a commit that referenced this pull request Sep 14, 2020
bors Bot pushed a commit that referenced this pull request Sep 14, 2020
bors Bot pushed a commit that referenced this pull request Sep 24, 2020
This is an obious follow-up to #3995. It changes the following declarations to a `Prop`:
* `arrow.has_lift`
* `strong_epi`
* `has_image`/`has_images`
* `has_strong_epi_mono_factorisations`
* `has_image_map`/`has_image_maps`

The big win is that there is now precisely one notion of exactness in every category with kernels and images, not a (different but provably equal) notion of exactness per `has_kernels` and `has_images` instance like in the pre-#3995 era.
bors Bot pushed a commit that referenced this pull request Sep 24, 2020
This is an obious follow-up to #3995. It changes the following declarations to a `Prop`:
* `arrow.has_lift`
* `strong_epi`
* `has_image`/`has_images`
* `has_strong_epi_mono_factorisations`
* `has_image_map`/`has_image_maps`

The big win is that there is now precisely one notion of exactness in every category with kernels and images, not a (different but provably equal) notion of exactness per `has_kernels` and `has_images` instance like in the pre-#3995 era.
mathlib-bors Bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 14, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
dagurtomas pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 22, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
utensil pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 26, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
xgenereux pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 15, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
uniwuni pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 19, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 22, 2024
This PR introduces a class for categories with explicit choices of binary products and terminal objects, and introduces the associated (Cartesian) symmetric monoidal instance. The primary use of this class is to be able to define internal algebraic objects in categories with chosen finite products, while retaining good definitional properties of the products in question, primarily as a convenience.

We introduce an instance of this new class for the category of types where the binary product is the usual type-theoretic product and the terminal object is `PUnit`. Future work will introduce an instance for other categories, especially the category of affine schemes which should make objects like group schemes more convenient.

NOTE: In some sense this reverses the refactor done in leanprover-community/mathlib3#3995 but only in the particular case of binary products and terminal objects. Working with (nonexplicit) (co)limits is still the preferred way to work with (co)limits in abstract categories, and instances of `ChosenFiniteProducts` (and other similar classes which may be introduced in the future) should be carefully considered before they are introduced.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants